import {Component, Inject, OnInit} from '@angular/core';
import {MAT_DIALOG_DATA, MatDialogRef} from '@angular/material';
import * as JsBarcode from 'jsbarcode';

@Component({
  selector: 'app-print',
  templateUrl: './print.component.html',
  styleUrls: ['./print.component.scss']
})
export class PrintComponent implements OnInit {

  now = Date.now();
  currentPro: any;

  constructor(@Inject(MAT_DIALOG_DATA) public data: any,
              private dialogRef: MatDialogRef<PrintComponent>) { }

  ngOnInit() {
    console.log(this.data.info.currentPro);
    JsBarcode('#barcode', this.data.info.prodNum, {
      height: 60,
      displayValue: false
    });
    console.log(JsBarcode);
  }

}
